package cn.xiaoming.car.server.content.service.imp;


import cn.xiaoming.car.pojo.car.pojo.entity.DictDistrict;
import cn.xiaoming.car.pojo.car.pojo.vo.DiscDistrictTreeItemVO;
import cn.xiaoming.car.server.IDictDistrictService;
import cn.xiaoming.car.server.content.dao.persist.mapper.DictDistrictMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.*;

@Slf4j
@Service
public class DistDistrictImpl implements IDictDistrictService {

    @Autowired
    private DictDistrictMapper dictDistrictMapper;

    @Override
    public List<DictDistrict> selectByParentId(Long parentId) {
        QueryWrapper<DictDistrict> queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("parent_id",parentId);
        List<DictDistrict> dictDistricts = dictDistrictMapper.selectList(queryWrapper);
        return dictDistricts;
    }
}
